From b7c8087832883f882029465053493f232cfcb0cc Mon Sep 17 00:00:00 2001 From: "vh249@airwolf.cl.cam.ac.uk" Date: Mon, 7 Mar 2005 14:32:50 +0000 Subject: [PATCH] bitkeeper revision 1.1159.258.22 (422c6612riGtD5GGqVTNqhuli2WrwQ) fix spinlock still held while leaving function in case of error Signed-off-by: Vincent Hanquez --- BitKeeper/etc/logging_ok | 1 + linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index d1c20d6e5f..935727fd0b 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -63,4 +63,5 @@ tlh20@elite.cl.cam.ac.uk tlh20@labyrinth.cl.cam.ac.uk tw275@labyrinth.cl.cam.ac.uk tw275@striker.cl.cam.ac.uk +vh249@airwolf.cl.cam.ac.uk xenbk@gandalf.hpl.hp.com diff --git a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c index efd4663bcc..6d675b449a 100644 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c @@ -354,22 +354,25 @@ int __direct_remap_area_pages(struct mm_struct *mm, { pgd_t * dir; unsigned long end = address + size; + int error; dir = pgd_offset(mm, address); if (address >= end) BUG(); spin_lock(&mm->page_table_lock); do { + error = -ENOMEM; pmd_t *pmd = pmd_alloc(mm, dir, address); if (!pmd) - return -ENOMEM; + break; + error = 0; direct_remap_area_pmd(mm, pmd, address, end - address, &v); address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; } while (address && (address < end)); spin_unlock(&mm->page_table_lock); - return 0; + return error; } -- 2.30.2